﻿using Gateway.Application.Channels;
using Gateway.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Modularity;

namespace Gateway.Application
{
    /// <summary>
    /// application module
    /// </summary>
    [DependsOn()]
    public class ApplicationAbpModule :AbpModule
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override Task ConfigureServicesAsync(ServiceConfigurationContext context)
        {
            context.Services.AddChannel();
            //context.Services.AddDataService(typeof(InfrastructureModule));
            return base.ConfigureServicesAsync(context);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override Task OnApplicationInitializationAsync(ApplicationInitializationContext context)
        {
            var app= context.GetApplicationBuilder();

            app.UseChannel();

            return base.OnApplicationInitializationAsync(context);
        }
    }
}
